from sklearn.datasets import load_iris
x, y = load_iris(return_X_y=True)
from sklearn.model_selection import train_test_split
x_train, x_test, y_train, y_test = train_test_split(x, y, train_size=0.7, random_state=666)

from sklearn.naive_bayes import GaussianNB
model = GaussianNB()
model.fit(x_train, y_train)
print('Training score', model.score(x_train, y_train))
print('Testing score', model.score(x_test, y_test))
